home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / xc / .callhq < prev    next >
Text File  |  1994-03-10  |  850b  |  37 lines

  1. # .callhq
  2. # script to call and login to a Unix/Xenix system that
  3. # needs BREAK signals to switch bps rates
  4.  
  5.     debug "on"        # turn on verbose script reporting
  6.     tty "on"        # echo received characters to screen
  7.     set bps 9600 ;     # extraneous semicolons don't matter
  8.  
  9.     #dial, if we haven't already from the dial directory
  10.     if ! linked        # note the space after the "!"
  11.     then
  12.         dial "12127874639"
  13.     endif
  14.  
  15.     while ! waitfor "CONNECT" 40        # redial forever
  16.     do
  17.         redial
  18.     done
  19.  
  20.     # try five times to get a login prompt
  21.     assign counter eq 5
  22.     while ! waitfor "login:" 10
  23.     do
  24.         decr counter; if counter lessthan 1; then quit; fi
  25.         xmitbrk                # send a BREAK signal
  26.     done
  27.  
  28.     # now connected, at login prompt
  29.     beep                    # just a personal touch
  30.     pause 3
  31.     transmit "username^M"
  32.     waitfor "word:" 5
  33.     debug "off"
  34.     transmit "password^M"
  35.     debug "on"
  36.     exit                    # out to terminal mode
  37.